package com.andrew.markov.process;

import org.apache.commons.math3.linear.Array2DRowRealMatrix;
import org.apache.commons.math3.linear.RealMatrix;

public class StateProbability {

	public StateProbability() {
		super();
	}

	public static double[][] performParkovSteps(double[][] incomintMatrix, int pow) {

		RealMatrix apacheMatrix = new Array2DRowRealMatrix(incomintMatrix);
//		double[][] finalM = n.multiply(n).getData();
		
		double[][] finalM = apacheMatrix.power(pow).getData();
		
		
		
		
		return finalM;

		// for (int i = 0; i < finalM.length; i++) {
		// for (int j = 0; j < finalM.length; j++) {
		// System.out.print((float) finalM[i][j] + "   ");
		// }
		// System.out.println();
		//
		// }

	}

}
